﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;
using Northeast.BRE.Common;

namespace Northeast.BRE.Engine.Activities
{

    public sealed class DemoCodeActivity : RuleBase
    {
        public InArgument<string> Text { get; set; }

        protected override bool Execute(CodeActivityContext context)
        {
            string text = context.GetValue(this.Text);
            Console.WriteLine(String.Format("this.Execute Method ; {0} from {1}", text, this.GetHashCode().ToString()));

            return base.Execute(context);
        }

        protected override bool Validate(CodeActivityContext context)
        {
            string text = context.GetValue(this.Text);
            Console.WriteLine(String.Format("Validate Method ; {0} from {1}", text, this.GetHashCode().ToString()));

            return true;
        }
    }
}
